#ifndef HMI_H
#define HMI_H

#include <QObject>
#include <QWidget>
#include <QtXml>
#include <QDomDocument>
#include <QDomElement>
#include <QDomNode>
#include <QXmlStreamReader>
#include <QFile>
#include <QFileDialog>
#include <QTreeView>
#include <QTreeWidget>
#include <QVector>
#include <QFileSystemModel>

#include "_Interface/_interface_hmi.h"
#include "_Interface/_Datastruct.h"
#include "Hmi/cCoordinateAdjust/coordinateadjust.h"
#include "Hmi/cRobotOpenGLView/robotdataview.h"

#include "ui_robcontrollerhmi.h"

namespace Ui { class RobControllerHMI; }

class Hmi : public HmiInterface{
    Q_OBJECT
public:
    Hmi();
    ~Hmi();
private:
    Ui::RobControllerHMI* ui;
    QFileSystemModel *pDocumentModel;
private:
    DialogCoordinateAdjust* uiCoordinateAdjusts = nullptr;
    RobotDataView*          uiRobotDataView = nullptr;
private:
    short SignalSlotConnect();          //关联主界面信号与槽
    void  RecurrenceAnalysisScriptXML(QDomElement &docElem, QTreeWidgetItem *pItem);
public:
    void FastTimerLoop();
    void SlowTimerLoop();

    void onbtnclicked_Home();
    void onbtnclicked_Setting();
    void onbtnclicked_Edit();

    void onbtnclicked_MainScriptStatus();
    void onbtnclicked_SubScriptStatus();
    void onbtnclicked_VisHmi();
    void onbtnclicked_Coordinate();

public slots:
    void onbtnclicked_HomeNew();
    void onbtnclicked_HomeOpen();
    void onbtnclicked_HomeSelect();
public:
    void fasttimer_RoboticOpenGLViewUpdate();
};

#endif // HMI_H
